import BaseModel from "../base/model/BaseModel";

export default abstract class BaseLangManager extends BaseModel {
    protected path:string = "";
    protected langName:string = "";
    constructor(){
        super();
    }

    setPath(path:string){
        this.path = path;
    }


    setLang(langName:string,data?){
        if(this.langName == langName){
            return;
        }
        this.langName  = langName;
        this.update();
    }


    getLangName(){
        return this.langName
    }

    abstract getValue(langID:string,opt?:any):string;
    /**
     * 当语言变化时更新所有组件
     */
    abstract update():void;

    abstract clear():void;
}
